Single-pointer first-in-first-out (FIFO) buffers are commonly used by software pipelines to read data into the buffer and write data back out of the buffer. Single-pointer FIFO buffers use a single data pointer to incrementally process data written into and read out of the FIFO buffer. Single-pointer FIFO buffers preserve the order of data stored in the buffer, however single-pointer FIFO buffers face issues of contention in multi-stage software pipelines, where racing conditions for data may be present. Single-pointer FIFO buffers are also under-utilized in out-of-order consumption patterns. Since single-pointer FIFO buffers incrementally step through the buffer using the pointer, a single-pointer FIFO buffer is unable to preserve the order in which data is read into the buffer, while also scanning the buffer for empty blocks when the pointer references a block in the buffer that still stores data for processing.
A common solution used to alleviate racing conditions is locking, where the buffer receives a request and initiates a lock while waiting for the output from one stage to be completed upon which the buffer unlocks and accepts new requests. However, while initiating locks into a buffer keeps the data in order and avoids corrupting the data as it is processed by different stages, the locks reduce the speed at which the buffer can process information. In an example of the second problem, data may be read out of the FIFO buffer at multiple stages in the same cycle and while data in an earlier stage is still being processed, data in a later stage is used and deleted, resulting in an empty stage in the FIFO buffer that cannot be reutilized until all the previous stages are also empty.